package STUDENT.TRANDAODAIVI.OOPs.BaitapOOPEX2;

class Octagon{
	float side;
	public  Octagon(float side){
		this.side=side;
	}
	public float getP(Octagon object){
        return (float)  ((2+4/Math.sqrt(2))*side*side);
	}
	public float getS(Octagon object){
		return (float) 8*side;
	}
	public void toString(Octagon object){
		System.out.println("Side: "+side);
		System.out.println("Perimeter: "+ getP(object));
		System.out.println("Area: "+getS(object));
	}
	
}

public class BT2 {
public static void main(String[] args){
	Octagon object=new Octagon(8);
	object.toString(object);
}
}
